package main

//wg * WaitGroup) Add(delta int)	等待组的计数器 +1
//(wg * WaitGroup) Done()	等待组的计数器 -1
//(wg * WaitGroup) Wait()	当等待组计数器不等于 0 时阻塞直到变 0。
//var x int64
//var wg sync.WaitGroup
//
//func add() {
//for i := 0; i < 5000; i++ {
//x = x + 1
//}
//wg.Done()
//}
//func main() {
//wg.Add(2)
//go add()
//go add()
//wg.Wait()
//fmt.Println(x)
//}